using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;

namespace yeqw.FrameWork
{
    public class EncryptHelper
    {
        public static string EncryptMD5(string Original)
        {
            return EncryptMD5(Original, "GB2312");
        }
        public static string EncryptMD5(string original, string encoding)
        {
            byte[] bytes = Encoding.GetEncoding(encoding).GetBytes(original);
            byte[] buffer2 = new MD5CryptoServiceProvider().ComputeHash(bytes, 0, bytes.Length);
            StringBuilder builder = new StringBuilder();
            foreach (byte num in buffer2)
            {
                builder.Append(num.ToString("x2"));
            }
            return builder.ToString();
        }

 

 


    }
}
